package com.gavin.netflix.ribbonclient.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

/**
 * @author: Gavin
 * Description:
 * Date: 2019/1/18 Time: 16:19
 * Zhan Hong Copyright (c) 2018 All Rights Reserved.
 **/
@Component
public class HiService {

    @Autowired
    RestTemplate restTemplate;
    public String hiService(String name) {
        return restTemplate.getForObject("http://SPRING-CLOUD-RIBBON/hi/" + name,String.class);
    }
}
